# Contributor: Guilherme Felipe da Silva <gfsilva.eng@gmail.com>
# Maintainer: Guilherme Felipe da Silva <gfsilva.eng@gmail.com>
pkgname=py3-modbus-tk
_pkgname="${pkgname#py3-}"
pkgver=1.1.1
pkgrel=0
pkgdesc="Create Modbus app easily with Python"
url="https://github.com/ljean/modbus-tk"
arch="noarch"
license="LGPL-2.1-or-later"
depends="python3 py3-pyserial"
makedepends="py3-setuptools"
source="$_pkgname-$pkgver.tar.gz::https://github.com/ljean/modbus-tk/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	python3 -m unittest tests/unittest_*
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="
9868a6720434a86da2f87dc53719bbd21595e0c2e20fe1acb5baf7dca18c7da2afd83a6f02d15947725967755f6f43eb60fa66deef7e3c907dfbfd6e22a48f84  modbus-tk-1.1.1.tar.gz
"
